#!/usr/bin/python3
# -*- encoding=utf-8 -*-

import requests
import user

class Monitor:

    def __init__(self,headers,session):  #构造函数
        self.headers = headers
        self.session = session

    def getMetricById(self,resourceId):
        
        url = 'http://172.99.1.102:6080/monitor/getMetric.action?resourceId=%s'%(resourceId)
        #url = 'http://172.99.1.102:6080/monitor/getMetric.action'
        req = self.session.get(url,headers=self.headers) 
        return req

        


